import { createApp } from 'vue'
import './style.scss'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from '@/router'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


async function initAPP() {
    const app = createApp(App)
    const pinia = createPinia()
    pinia.use(piniaPluginPersistedstate);
    // 挂载图标
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component(key, component)
    }
    app.use(pinia)
    app.use(router)
    app.mount('#app')
}

await initAPP()
